import request from "@/utils/request.js"

export default{
  findById(id){
    return request({
      url:`/productClass/${id}`,
      method:'get'
    });
  },
  findAll(){
    return request({
      url:`/productClass`,
      method:'get'
    });
  },
  deleteById(id){
    return request({
      url:`/productClass/${id}`,
      method:'delete'
    });
  },
  save(productUnit){
    return request({
      url:`/producClass`,
      method:'post',
      data:productUnit
    });
  },
  update(productUnit,id){
    return request({
      url:`/productClass/{id}`,
      method:'put',
      data:productUnit
    });
  },
  findByParentId(parentId){
    return request({
      url:`/productClass/${parentId}`,
      method:'get'
    });
  },
  renderTreeData(){
    return request({
      url:`/productClass/getTreeData`,
      method:'get'
    });
  }



}
